home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
graphic
/
dbwrendr.zip
/
RAY.DOC
< prev
next >
Wrap
Text File
|
1989-11-08
|
53KB
|
1,207 lines
********************************************************************
* *
* Copyright (c) 1987, William T. Baldridge *
* All Rights Reserved *
* *
* This file is part of DBW_Render *
* *
* DBW_Render is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY. No author or distributor accepts *
* responsibility to anyone for the consequences of using it or for *
* whether it serves any particular purpose or works at all, unless *
* he says so in writing. Refer to the DBW_Render General Public *
* License for full details. *
* *
* Everyone is granted permission to copy, modify and redistribute *
* DBW_Render, but only under the conditions described in the *
* DBW_Render General Public License. A copy of this license is *
* supposed to have been given to you along with DBW_Render so you *
* can know your rights and responsibilities. It should be in a *
* file named COPYING. Among other things, the copyright notice and *
* this notice must be preserved on all copies. *
********************************************************************
* *
* This is the IBM-PC/XT/AT version of the DBW_Render documentation *
* amended 10/31/89 by John H. Lowery *
* *
********************************************************************
Sections
~~~~~~~~
Announcement - announcement of software availability
Included - what's in the package
Under Development - what's currently being written
Background Info - what is this package?
Running RAY - how to run the ray tracer
Running DISPLAY - how to run the display program
Creating a .DAT file - what goes into the input file
Source file info - how to rebuild the package
Announcement
~~~~~~~~~~~~
If you liked the ray traced images previously distributed... you're
going to LOVE DBW_Render. This package is a FULL re-implementation
of the Ray Tracer that I've been using on VAXen to create all those
images.
It was developed to run on a standard Amiga, and will run on an IBM
(or compatible) PC, XT, AT or PS2 with 512k of memory, and a MCGA or
VGA display adapter (or compatible). It will run (after a fashion)
without a math coprocessor, but performance is vastly improved with an
8087 or 80287. By adding AI-heuristics, elapsed time to compute an
image is within the same order of magnitude as a VAX-780. For example,
"glass" computes (at 320x200 resolution, 256 colors) in 12 hours on a
10 MHz AT compatible with an 80287.
-1-
Included:
~~~~~~~~~~~~
READ.ME - Notes, latest changes, etc.
RAY.EXE - ray tracing program
DISPLAY.EXE - general display program for RAY's output
*.DAT - sample input files
*.TMP - sample RAY output files
*.c - all Microsoft C v5.1 sources for the package
*.h - all Microsoft C include files for the package
RAY.DOC - full documentation for the package
COPYING - General License Agreement
Please read the General License Agreement (file: COPYING) before
proceeding.
Background Information
~~~~~~~~~~~~~~~~~~~~~~
The DBW_Render package uses an algorithm called Distributed Ray
Tracing. In addition to neatly solving the hidden surface problem,
ray tracing (in general) affords the opportunity for doing excellent
(that is, highly realistic) shading and illumination calculations.
DBW_Render was originally written for the Amiga computer, but is now
available for IBM-PC and PS/2 compatibles. It is written in Microsoft
C (version 5.1) and runs on any IBM PC/XT/AT/PS2 system that is
equipped with an MCGA- or VGA-type display. The IBM version of
DBW_Render is input-file compatible with the Amiga version (output
files are not compatible).
The RAY program knows how to create images composed of four primitive
geometric objects: spheres, parallelograms, triangles, and flat
circular rings (disks with holes in them). Some of the features of
the program are:
Determination of correct shadows cast by arbitrarily shaped
objects, onto arbitrarily shaped objects, due to arbitrarily
placed light sources.
Diffuse and specular reflections (with arbitrary levels of
gloss or polish). Rudimentary modeling of object-to-object
diffusely reflected light is also implemented, that among other
things accurately simulates color bleed effects from adjacent
contrasting colored objects.
Mirror reflections, including varying levels of mirror
smoothness or perfection.
Refraction and translucency (which is akin to variable
microscopic smoothness, like the surface of etched glass).
Two types of light sources: purely directional (parallel rays
from infinity) of constant intensity, and spherical sources
(like light bulbs, which cast penumbral shadows as a function
of radius and distance) where intensity is determined by the
inverse square law.
Photographic depth-of-field. That is, the virtual camera may
be focused on a particular object in the scene, and the virtual
camera's aperture can be manipulated to affect the sharpness of
foreground and background objects.
-2-
Solid texturing. Normally, a particular object (say a sphere)
is considered to have constant properties (like color) over the
entire surface of the object, often resulting in fake looking
objects. Solid texturing is a way to algorithmically change
the surface properties of an object (thus the entire surface
area is no longer of constant nature) to try and model some
real world material. Currently the program has built in rules
for modelling wood, marble, bricks, snow covered scenes, water
(with arbitrary wave sources), plus more abstract things like
color blend functions.
Fractals. The program implements what's known as recursive
triangle subdivision, which creates all manners of natural
looking surface shapes (like broken rock, mountains, etc.).
The character of the fractal surface (degree of detail,
roughness, etc.) is controlled by parameters fed to the
program.
AI heuristics to complete computation of a scene within a user
specified length of time.
When the RAY program runs, it reads a sort of command file, that
contains a geometric description of the scene to be rendered, plus
desired global lighting conditions, camera parameters, etc. Then
the program computes for a long time, writing each scan line to disk
as it computes it. The format of a scanline (in the .TMP) file is:
<line number> - 2 bytes long
<red pixels> - 160 bytes long (4 bits per pixel)
<green pixels> - 160 bytes long
<blue pixels> - 160 bytes long
which allows a single pixel's color to be represented in 12 bits, or
4096 colors. For an entire screen (200 scan lines) this file is
96,400 bytes. A second program is run (DISPLAY.EXE) to display the
.TMP file, and optionally convert it to a standard Compuserve GIF (TM)
format file.
In all, the DBW_Render package represents about 4000 lines of C
code. It is largely based on original algorithms for the VAX by Tom
Dahl and Tone Engel at Digital Equipment Corporation. The AMIGA
version took several months to create.
Running R